﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Batalha_Estelar
{
    public class ShipFactory
    {
        private BatalhaEstelar game = null;

        public ShipFactory(BatalhaEstelar game)
        {
            this.game = game;
        }

        public PlayerShip CreatePlayerShip(string playerID, Vector2 position)
        {
            var playerTexture = game.Content.Load<Texture2D>(@"Imagens/nave");
            var orientacao = new Vector2(0.0f, -1.0f);
            var ship = new PlayerShip(playerID, this.game, position, orientacao, playerTexture);
            var hud = new Hud(game, ship);

            game.State.Add(hud);
            game.State.Add(ship);

            return ship;
        }

        public EnemyShip CreateEnemyShip(Vector2 position)
        {
            var enemyTexture = game.Content.Load<Texture2D>(@"Imagens/nave_inimiga");
            var orientacao = new Vector2(0.0f, 1.0f);
            var ship = new EnemyShip(this.game, position, orientacao, enemyTexture);

            game.State.Add(ship);

            return ship;
        }
    }
}
